package com.avic.modules.equipment.service.impl;

import com.avic.common.service.impl.BaseServiceImpl;
import com.avic.common.utils.QueryHelpPlus;
import com.avic.modules.equipment.domain.Station;
import com.avic.modules.equipment.service.StationService;
import com.avic.modules.equipment.service.dto.StationQueryCriteria;
import com.avic.modules.equipment.service.mapper.StationMapper;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhangzikang 站位表
 * @date 2022-08-14
 */
@Service
@AllArgsConstructor
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class)
public class StationServiceImpl extends BaseServiceImpl
        <StationMapper, Station> implements StationService {

    /**
     * 查询所有数据不分页
     * @param criteria 条件参数
     * @return List<Station>
     */
    @Override
    public List<Station> queryAll(StationQueryCriteria criteria) {
        return baseMapper.selectList(QueryHelpPlus.getPredicate(Station.class, criteria));
    }
}
